package com.lupan.mutithred.cp3_Phaser;

import java.util.concurrent.Phaser;

/**
 * 说明：
 *
 * @author lupan
 * @version 2017/4/25 14:30
 */
public class PhaserThread extends Thread{

    private Phaser phaser;

    public PhaserThread(Phaser phaser) {
        this.phaser = phaser;
    }

    @Override
    public void run(){
        System.out.println(Thread.currentThread().getName()+" begin。。。");
        phaser.arriveAndAwaitAdvance();
        System.out.println(Thread.currentThread().getName()+" end。。。");
    }
}
